﻿using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace RN.ERP.DAL.Context
{
    public class FLY5_Context : DbContext
    {
        public DbSet<RN.ERP.Entity.ADSessionKey> SessionKeys { get; set; }
        public DbSet<RN.ERP.Entity.CACertificate> CACertificates { get; set; }

        public DbSet<RN.ERP.Entity.DicArea> DicAreas { get; set; }

        public DbSet<RN.ERP.Entity.MDDepartment> MDDepartments { get; set; }
        public DbSet<RN.ERP.Entity.MDRole> MDRoles { get; set; }
        public DbSet<RN.ERP.Entity.MDFunction> MDFunctions { get; set; }
        public DbSet<RN.ERP.Entity.MDFuncType> MDFuncTypes { get; set; }
        public DbSet<RN.ERP.Entity.MDPermission> MDPermissions { get; set; }
        public DbSet<RN.ERP.Entity.MDUser> MDUsers { get; set; }
        public DbSet<RN.ERP.Entity.MDUserRole> MDUserRoles { get; set; }
        public DbSet<RN.ERP.Entity.MDMenu> MDMenus { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
